// Node SDK exports
// Unfortunately, we cannot `export * from '@sentry/node'` because in prod builds,
// Vite puts these exports into a `default` property (Sentry.default) rather than
// on the top - level namespace.

import { sentryAstro } from './integration';
import { handleRequest } from './server/middleware';

// Hence, we export everything from the Node SDK explicitly:
export {
  addBreadcrumb,
  addEventProcessor,
  addIntegration,
  amqplibIntegration,
  anthropicAIIntegration,
  // eslint-disable-next-line deprecation/deprecation
  anrIntegration,
  googleGenAIIntegration,
  // eslint-disable-next-line deprecation/deprecation
  disableAnrDetectionForCallback,
  captureCheckIn,
  captureConsoleIntegration,
  captureEvent,
  captureException,
  captureFeedback,
  captureMessage,
  captureSession,
  close,
  connectIntegration,
  consoleIntegration,
  contextLinesIntegration,
  continueTrace,
  createGetModuleFromFilename,
  createLangChainCallbackHandler,
  createTransport,
  cron,
  dataloaderIntegration,
  dedupeIntegration,
  defaultStackParser,
  endSession,
  expressErrorHandler,
  expressIntegration,
  extraErrorDataIntegration,
  fastifyIntegration,
  firebaseIntegration,
  flush,
  fsIntegration,
  functionToStringIntegration,
  generateInstrumentOnce,
  genericPoolIntegration,
  getActiveSpan,
  getAutoPerformanceIntegrations,
  getClient,
  getCurrentScope,
  getDefaultIntegrations,
  getGlobalScope,
  getIsolationScope,
  getRootSpan,
  getSentryRelease,
  getSpanDescendants,
  getSpanStatusFromHttpCode,
  getTraceData,
  getTraceMetaTags,
  httpHeadersToSpanAttributes,
  winterCGHeadersToDict,
  graphqlIntegration,
  hapiIntegration,
  honoIntegration,
  httpIntegration,
  httpServerIntegration,
  httpServerSpansIntegration,
  // eslint-disable-next-line deprecation/deprecation
  inboundFiltersIntegration,
  eventFiltersIntegration,
  initOpenTelemetry,
  isInitialized,
  isEnabled,
  kafkaIntegration,
  koaIntegration,
  knexIntegration,
  lastEventId,
  linkedErrorsIntegration,
  localVariablesIntegration,
  lruMemoizerIntegration,
  makeNodeTransport,
  modulesIntegration,
  mongoIntegration,
  mongooseIntegration,
  mysql2Integration,
  mysqlIntegration,
  nativeNodeFetchIntegration,
  NodeClient,
  nodeContextIntegration,
  onUncaughtExceptionIntegration,
  onUnhandledRejectionIntegration,
  openAIIntegration,
  langChainIntegration,
  langGraphIntegration,
  parameterize,
  pinoIntegration,
  postgresIntegration,
  postgresJsIntegration,
  prismaIntegration,
  childProcessIntegration,
  createSentryWinstonTransport,
  redisIntegration,
  requestDataIntegration,
  rewriteFramesIntegration,
  Scope,
  SDK_VERSION,
  SEMANTIC_ATTRIBUTE_SENTRY_OP,
  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
  setContext,
  setCurrentClient,
  setExtra,
  setExtras,
  setHttpStatus,
  setMeasurement,
  setTag,
  setTags,
  setupConnectErrorHandler,
  setupExpressErrorHandler,
  setupHapiErrorHandler,
  setupHonoErrorHandler,
  setupKoaErrorHandler,
  setUser,
  spanToBaggageHeader,
  spanToJSON,
  spanToTraceHeader,
  spotlightIntegration,
  startInactiveSpan,
  startNewTrace,
  suppressTracing,
  startSession,
  startSpan,
  startSpanManual,
  systemErrorIntegration,
  tediousIntegration,
  trpcMiddleware,
  updateSpanName,
  vercelAIIntegration,
  withActiveSpan,
  withIsolationScope,
  withMonitor,
  withScope,
  supabaseIntegration,
  instrumentSupabaseClient,
  zodErrorsIntegration,
  profiler,
  logger,
  consoleLoggingIntegration,
  createConsolaReporter,
  wrapMcpServerWithSentry,
  NODE_VERSION,
  featureFlagsIntegration,
  type FeatureFlagsIntegration,
  launchDarklyIntegration,
  buildLaunchDarklyFlagUsedHandler,
  openFeatureIntegration,
  OpenFeatureIntegrationHook,
  statsigIntegration,
  unleashIntegration,
  growthbookIntegration,
  metrics,
} from '@sentry/node';

export { init } from './server/sdk';

export default sentryAstro;

// This exports the `handleRequest` middleware for manual usage
export { handleRequest };
